import config from "../../static/js/conf/config";
import {request} from "../../static/js/utils/request";

//加入购物车
export function addCartData(data){
    return request(config.baseApi+"/v1/user/cart/add","post",data);
}

//显示购物车里的数据
export function getCartData(data){
    return request(config.baseApi+"/v1/user/cart/show","post",data);
}

//清空购物车
export function clearCartData(data){
    return request(config.baseApi+"/v1/user/cart/clear","post",data);
}

//删除购物车里的菜品
export function delCartData(data){
    return request(config.baseApi+"/v1/user/cart/del","post",data);
}

//更新购物车里的数量
export function setAmountData(data){
    return request(config.baseApi+"/v1/user/cart/set_amount","post",data);
}